package com.sls.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sls.common.utils.PageUtils;
import com.sls.mall.product.entity.BrandEntity;
import com.sls.mall.product.entity.CategoryBrandRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author Gesx
 * @email 759065243@qq.com
 * @date 2021-05-13 17:13:10
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 保存品牌分类名字
     * @param categoryBrandRelation
     */
    void saveBrandAndCateoryName(CategoryBrandRelationEntity categoryBrandRelation);

    /**
     * 更新品牌
     * @param brandId
     * @param name
     */
    void updateBrand(Long brandId, String name);

    void updateCategory(Long catId, String name);

    /**
     * 根据分类ID查询关联的品牌信息
     * @param catId
     * @return
     */
    List<BrandEntity> queryBrandsByCatId(Long catId);
}

